package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import nl.coderight.jazz.dialog.MessageDialog;
import nl.coderight.jazz.dialog.MessageType;
import jtk.project4.fleet.domain.AccidentImages;



public class AccidentImageDao extends IbatisDao{
	
	public int deleteAccidentImage(AccidentImages accidentimage) throws SQLException{
		return (int) getSqlMap().delete("DELETE_ACCIDENT_IMAGES", accidentimage);
	}
	
	public int updateAccidentImage(AccidentImages accidentimage) throws SQLException{
		return (int) getSqlMap().update("UPDATE_ACCIDENT_IMAGES", accidentimage);
	}
	
	public AccidentImages insertAccidentImage(AccidentImages accidentimage) throws SQLException {
		return (AccidentImages) getSqlMap().insert("INSERT_ACCIDENT_IMAGES",accidentimage);
	}
	
		
	public static void main (String args[]) throws SQLException{
		
		AccidentImages accidentimage = new AccidentImages();
		accidentimage.setDescription("Coba dari Main");
		new AccidentImageDao().insertAccidentImage(accidentimage);
		System.out.println("Description dengan nama "+accidentimage.getDescription()+ " telah di insert pada DB");
	}
}
